package com.yaoge.bao1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component("student")

public class Student {
    @Value("李四")
    private String name;
    @Value("18")
    private int    age;

//    @Autowired
//    @Qualifier("school")
    @Resource
    private  School school;
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", school=" + school +
                '}';
    }



}
